package com.diandi.signature.enums.platfrom;

/**
 *  CA认证状态
 * @author mwz
 * @create 2017-08-24 15:38
 * @version V1.0.0
 */
public enum CAInfoStatus {

    已落库(0,"已落库"),
    处理中(2,"处理中"),
    成功(1,"申请成功"),
    失败(3,"申请失败"),
    ;
    private int status;
    private String desc;

    CAInfoStatus(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static CAInfoStatus getEmun(int status){
        for ( CAInfoStatus caInfoStatus : CAInfoStatus.values()) {
            if(caInfoStatus.getStatus() == status){
                return caInfoStatus;
            }
        }
        return null;
    }
}
